package com.kksoft.readcm.objects;

import android.os.AsyncTask;
import android.os.Handler;

public final class ai
{
  private final Handler a;
  private final long b;
  private i c;
  private ah d;

  public ai(Handler paramHandler, long paramLong)
  {
    this.a = paramHandler;
    this.b = paramLong;
  }

  public final void a(AsyncTask paramAsyncTask)
  {
    if (this.c != null)
    {
      this.c.a();
      Handler localHandler1 = this.a;
      i locali1 = this.c;
      localHandler1.removeCallbacks(locali1);
    }
    i locali2 = new i(this, paramAsyncTask);
    this.c = locali2;
    Handler localHandler2 = this.a;
    i locali3 = this.c;
    long l = this.b;
    boolean bool = localHandler2.postDelayed(locali3, l);
  }

  public final void a(Runnable paramRunnable)
  {
    if (this.d != null)
    {
      this.d.a();
      Handler localHandler1 = this.a;
      ah localah1 = this.d;
      localHandler1.removeCallbacks(localah1);
    }
    ah localah2 = new ah(this, paramRunnable);
    this.d = localah2;
    Handler localHandler2 = this.a;
    ah localah3 = this.d;
    long l = this.b;
    boolean bool = localHandler2.postDelayed(localah3, l);
  }
}
